<link rel="stylesheet" href="forum/forum_ext/ext_1/topic_show.css">
<div class="content-ext-1">
	<div class="num">
		<span>评价 : <?php echo $topic['reply_c'] ?></span>
		<span class="sha">|</span>
		<span>查看 : <?php echo $topic['view_c'] ?></span>
	</div>
	<hr class="">
	<div class="row clearfix">
		<div class="col-md-7 column">
			<div class="topic-icon" style="background-image:url('<?php echo (!empty($topic['icon_url'])) ? $topic['icon_url'] : 'null' ?>')"></div>
		</div>
		<div class="col-md-5 column">
			<h3 class="name">
				<?php if (1 == $topic['digest']) { ?><span class="glyphicon glyphicon-fire"></span> <?php } ?><b><?php echo $topic['title'] ?></b>
				<?php echo (time()-24*3600 < $topic['l_r_at']) ? '<span class="label label-default">热</span>' : null ?>
				<?php echo (time()-24*3600 < $topic['c_at']) ? '<span class="label label-success">新</span>' : null ?>
				<?php if (0 < $topic['pay']) { ?><span class="label label-danger">$ <?php echo intval($topic['pay']) ?></span><?php } ?>
			</h3>
			<p class="price"><?php if (0 != $topic['price']) { ?><b><s>¥</s><?php echo $topic['price'] ?></b> <small>原价 <s>¥</s><?php echo $topic['price_org'] ?></small><?php } ?></p>
			<center>
			<?php require_once('forum/inc/pub_user_opr.phtml') ?>
			</center>
			<div class="main-up-user-face">
				<h5></h5>
				<?php while($topic_up = mysql_fetch_array($topic_ups)) { ?>
				<a target="_blank" href="<?php echo s_url('?c=center&a=index&user_id='.$topic_up['user_id']) ?>"><img src="img/center/user_face/<?php echo $topic_up['user_id'] ?>_min.jpg"/></a>
				<?php } ?>
			</div>
			<p class="phone"><b><span class="glyphicon glyphicon-phone-alt"></span> <?php echo $topic['phone'] ?></b></p>
		</div>
	</div>
	<hr class="">
	<h3 class="title"><b> 本单详情 </b><small>DETAILS</small></h3>
	<hr class="solid">
	<div class="floor">
		<span class="floor-lg">详情</span><sup>#</sup>
	</div>
	<span class="time"><a target="_blank" href="<?php echo s_url('?c=center&a=index&user_id='.$topic['user_id']) ?>"> <?php echo $topic['user_name'] ?></a> 发布于：<?php echo fmt_date($topic['c_at']) ?></span>
	<div class="text-content">
		<?php echo $topic['content'] ?>
	</div>
	<h3 class="title"><b> 用户评价 </b><small>REVIEWS</small></h3>
	<hr class="solid">
	<div class="row clearfix topic-reply">
		<div class="col-md-12 column">
			<div class="well">
				<form class="form-horizontal" id="topic_reply">
					<fieldset>
						<input type="hidden" name="topic_id" value="<?php echo $topic_id ?>"/>
						<div class="form-group">
							<div class="col-md-12">                     
								<textarea class="form-control input-lg" id="topic_r_content" name="content" style="width:103%;height:110px"></textarea>
							</div>
						</div>
						<!-- token -->
						<input type="hidden" name="token" value="<?php echo get_token() ?>"/>
						<div class="form-group">
							<label class="col-md-10 control-label"></label>
							<div class="col-md-2">
								<a href="javascript:do_topic_r_add()" class="btn btn-default btn-block"> 发布评价 </a>
							</div>
						</div>
					</fieldset>
				</form>
			</div>
		</div>
	</div>
	<div class="topic-r-r">
		<?php global $config ?>
		<?php if ($forum['user_id'] == @$_SESSION['auth']['id'] || $topic['user_id'] == @$_SESSION['auth']['id'] || in_array(@$_SESSION['auth']['id'], $config['manager']) || $city_info['user_id'] == @$_SESSION['auth']['id']) { ?>
		<a href="javascript:do_topic_digest(<?php echo $topic_id ?>)"><span class="glyphicon glyphicon-fire"></span>
			<?php if (1 == $topic['digest']) { ?> 取消精华 <?php } else { ?> 加精华 <?php } ?>
		</a>
		<a href="?c=forum&a=topic_edit&topic_id=<?php echo $topic_id ?>"><span class="glyphicon glyphicon-edit"></span> 编辑</a>
		<?php } ?>
		<a href="?c=forum&a=pay_topic_top&topic_id=<?php echo $topic_id ?>"><span class="glyphicon glyphicon-usd"></span> 付费置顶</a>
		<a class="del" href="javascript:do_topic_del(<?php echo $topic_id ?>, <?php echo $forum['id'] ?>)"><span class="glyphicon glyphicon-trash"></span> 删除(<span id="topic_del_c"><?php echo $topic['del_c'] ?></span>)</a>
	</div>
</div>
<script type="text/javascript">

$(document).ready(function(){
	auto_i_h(); 
});

function auto_i_h() {
	var i_h = ($('div.topic-icon').width()*0.6)+'px'; 
	$('div.topic-icon').css('height', i_h);
	$('div.topic-icon').css('background-size', 'auto '+i_h);
}

</script>
